Skip to content

[mlir][spirv] Add mlir-spirv-tests CI to run for mlir-spv target tests #152124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 7, 2025

Conversation

davidegrohmann
Copy link
Contributor

@davidegrohmann davidegrohmann commented Aug 5, 2025

This should execute also the MLIR SPIRV Target tests which require the SPIRV-Tools validator

@llvmbot
Copy link
Member

llvmbot commented Aug 5, 2025

@llvm/pr-subscribers-github-workflow

Author: Davide Grohmann (davidegrohmann)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/152124.diff

1 Files Affected:

  • (modified) .github/workflows/spirv-tests.yml (+2-2)
diff --git a/.github/workflows/spirv-tests.yml b/.github/workflows/spirv-tests.yml
index f15ca1cb64ba5..a2bb64d400bbf 100644
--- a/.github/workflows/spirv-tests.yml
+++ b/.github/workflows/spirv-tests.yml
@@ -23,7 +23,7 @@ jobs:
     name: Test SPIR-V
     uses: ./.github/workflows/llvm-project-tests.yml
     with:
-      build_target: check-llvm-codegen-spirv
+      build_target: check-llvm-codegen-spirv check-mlir
       projects:
-      extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON'
+      extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="X86;SPIRV" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON'
       os_list: '["ubuntu-24.04"]'

@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 28e45e5 to 2acd645 Compare August 5, 2025 11:29
Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it would be better to bifurcate spirv-tests.yml and have a separate version for mlir-spirv. It's very rare that we have PRs that affect both implementations, so having them separate could save us some CI time.

@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 2acd645 to 22ca55f Compare August 6, 2025 10:43
@davidegrohmann
Copy link
Contributor Author

I'm wondering if it would be better to bifurcate spirv-tests.yml and have a separate version for mlir-spirv. It's very rare that we have PRs that affect both implementations, so having them separate could save us some CI time.

Yes it is likely better. This is now done.

This should execute also the MLIR SPIRV Target tests which require the
SPIRV-Tools validation

Signed-off-by: Davide Grohmann <[email protected]>
Change-Id: Ied323152e36b95d6f21ed7d4ce4f5f813f280f17
@davidegrohmann davidegrohmann force-pushed the mlir-spv-enable-spirv-tests branch from 22ca55f to 0301179 Compare August 6, 2025 10:54
@kuhar kuhar changed the title [mlir][spv] Enable spirv-tests CI to run for mlir-spv target tests [mlir][spirv] Enable spirv-tests CI to run for mlir-spv target tests Aug 6, 2025
Signed-off-by: Davide Grohmann <[email protected]>
Change-Id: I52a5fcf79aba2c272a2ac6a4dc2c393a02b398d9
@davidegrohmann davidegrohmann changed the title [mlir][spirv] Enable spirv-tests CI to run for mlir-spv target tests [mlir][spirv] Add mlir-spirv-tests CI to run for mlir-spv target tests Aug 6, 2025
- add SPIRV dialect definition and implementation
- add serialization/deserialization implementation

Signed-off-by: Davide Grohmann <[email protected]>
Change-Id: Ib63045fec041ba7a2d52b527589c30157ed56258
Signed-off-by: Davide Grohmann <[email protected]>
Change-Id: I9919a359c8fbefbc5dd030f9a19c7a83fab12682
@kuhar
Copy link
Member

kuhar commented Aug 7, 2025

I'm going to merge once we confirm that the new check works as intended: https://github.com/llvm/llvm-project/actions/runs/16807047739/job/47602153053?pr=152124

@kuhar kuhar merged commit 3fa34f1 into llvm:main Aug 7, 2025
10 checks passed
@davidegrohmann davidegrohmann deleted the mlir-spv-enable-spirv-tests branch August 8, 2025 07:16
@IgWod-IMG
Copy link
Contributor

MLIR SPIR-V tests seem to take ~1h (https://github.com/llvm/llvm-project/actions/workflows/mlir-spirv-tests.yml) compared to regular checks that finish in ~5-10min. I wonder if there is any reason for that and whether we can bring the time down?

@davidegrohmann
Copy link
Contributor Author

MLIR SPIR-V tests seem to take ~1h (https://github.com/llvm/llvm-project/actions/workflows/mlir-spirv-tests.yml) compared to regular checks that finish in ~5-10min. I wonder if there is any reason for that and whether we can bring the time down?

I can have a look. Can you point me to the workflows scripts for the regular checks so I can compare those with the mlir spir-v tests script?

@kuhar
Copy link
Member

kuhar commented Aug 13, 2025

Probably no build cache? When I built this configuration locally, a lot of time was spent during spirv-tools checkout. I wonder if we can optimize how this gets cloned, e.g., --depth=1 or checkout submodules with -j $(nproc).

@IgWod-IMG
Copy link
Contributor

I can have a look. Can you point me to the workflows scripts for the regular checks so I can compare those with the mlir spir-v tests script?

I believe it's "CI Checks" (https://github.com/llvm/llvm-project/actions/workflows/premerge.yaml), script: https://github.com/llvm/llvm-project/blob/main/.github/workflows/premerge.yaml

@IgWod-IMG
Copy link
Contributor

IgWod-IMG commented Aug 13, 2025

I have also noticed that auto-merge doesn't wait for this job: #153440 We also should address that if deemed necessary. Not sure if this PR is the best place to track those issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants